#include "acceptor.h"
#include "acceptor_dragonball.h"


namespace igslib
{
	IAcceptorManager* CAcceptorManager::instance = 0;
	IAcceptorManager* CAcceptorManager::GetInstance() 
	{
		if ( instance == 0 )
		{
			instance = new CAcceptorManager();
		}
		return instance ;
	}
    IAcceptor* CAcceptorManager::NewMHAcceptor()
    {
        IAcceptor* rtn = new CAcceptor();
        cpns.insert(rtn);
        return rtn;
    }
	IAcceptor* CAcceptorManager::New_ProjMCU(const std::string& name)
	{
		IAcceptor* rtn = nullptr;
		if(name == "DragonBallRace")
		{	
			rtn = new acceptor_Grgn(); 
            cpns.insert(rtn);
		}else if(name == "DragonWarrior")
		{	
			rtn = new acceptor_Grgn(); 
            cpns.insert(rtn);
		}
        return rtn;
	}
}

extern "C"{
	igslib::IAcceptorManager* GetAcceptorManagerInstance()
	{
		return igslib::CAcceptorManager::GetInstance();
	}
}
